import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: () => import('@/views/layout'),
    children: [
      {
        path: '/', name: 'home', component: () => import('@/views/home')
      },
      {
        path: '/house', name: 'house', component: () => import('@/views/household')
      },
      {
        path: '/person', name: 'person', component: () => import('@/views/personnel')
      },
      {
        path: '/my',
        name: 'my',
        component: () => import('@/views/my')
      }
    ]
  },
  {
    path: '/details',
    name: 'nannydetail',
    component: () => import('@/views/nanny-details')
  },
  {
    path: '/job', name: 'job', component: () => import('@/views/job')
  },
  {
    path: '/enter', name: 'enter', component: () => import('@/views/enter')
  },
  {
    path: '/my/about',
    name: 'about',
    component: () => import('@/views/my/components/about.vue')
  },
  {
    path: '/my/call',
    name: 'call',
    component: () => import('@/views/my/components/call.vue')
  },
  {
    path: '/searchhouse',
    name: 'searchHousehold',
    component: () => import('@/views/search-household')
  },
  {
    path: '/standard',
    name: 'serviceStandard',
    component: () => import('@/views/service-standard')
  },
  {
    path: '/yuesaopage/:serversId',
    name: 'MaternityPage',
    component: () => import('@/views/maternity-page')
  }, {
    path: '/companypage/:companyId',
    name: 'CompanyPage',
    component: () => import('@/views/company-page')
  },
  {
    path: '/login',
    name: 'LoginIndex',
    component: () => import('@/views/login')
  },
  {
    path: '/per',
    name: 'per',
    component: () => import('@/views/per')
  },
  {
    path: '/authentication',
    name: 'authentication ',
    component: () => import('@/views/authentication')
  },
  {
    path: '/authorized',
    name: 'authorized',
    component: () => import('@/views/Authorized')

  },
  {
    path: '/follow',
    name: 'follow',
    component: () => import('@/views/my/components/follow-company')
  },
  {
    path: '/jobrecord',
    name: 'jobrecord',
    component: () => import('@/views/my/components/jobrecord')
  },
  {
    path: '/filter',
    name: 'intellect-Filter',
    component: () => import('@/views/intellect-filter')
  },
  {
    path: '/select',
    name: 'company-select',
    component: () => import('@/views/company-select')
  },
  {
    path: '/serve',
    name: 'serve',
    component: () => import('@/views/my/components/serve')
  },
  {
    path: '/cleaningproject',
    name: 'cleaningproject',
    component: () => import('@/components/cleaning-project')
  },
  {
    path: '/babycare',
    name: 'babycare',
    component: () => import('@/components/baby-care')
  }
]

const router = new VueRouter({
  routes
})

export default router
